package com.blockmeta.bbs.immodule.net.pojo;

import com.blockmeta.bbs.immodule.bean.beaninterface.ICircleEntry;
import com.blockmeta.bbs.immodule.utils.IMUtils;
import com.google.gson.annotations.SerializedName;

/**
 * @author AirThor
 * @date 2019/3/28.
 */
public class IMCircleEntityBook implements ICircleEntry {



    public boolean recommendCircle = true;
    /**
     * account : 100001
     * auth_rule : 0  是否需要验证
     * big_class_id : 1
     * create_by_id : 331820
     * create_date : 1552354835
     * description :
     * group_level : 0
     * group_logo :
     * id : 1
     * manager1_id : 0
     * manager2_id : 0
     * me_in : false
     * qrcode :
     * slogan :
     * small_class_id : 0
     * user_count : 2
     * user_level : 0 加圈等级限制
     */

    @SerializedName("name")
    public String name;
    @SerializedName("auth_rule")
    public int authRule;
    @SerializedName("big_class_id")
    public int bigClassId;
    @SerializedName("create_by_id")
    public long createById;
    @SerializedName("create_date")
    public int createDate;
    @SerializedName("description")
    public String description;
    @SerializedName("group_level")
    public int grade;
    @SerializedName("group_logo")
    public String groupLogo;
    @SerializedName("id")
    public long circleId;
    @SerializedName("manager1_id")
    public int manager1Id;
    @SerializedName("manager2_id")
    public int manager2Id;
    @SerializedName("me_in")
    public boolean joinState;
    @SerializedName("qrcode")
    public String qrcode;
    @SerializedName("slogan")
    public String slogan;
    @SerializedName("small_class_id")
    public int smallClassId;
    @SerializedName("user_count")
    public int size;
    @SerializedName("user_level")
    public int userLevel;
    @SerializedName("identification")
    public int identification;

    @Override
    public long getId() {
        return circleId;
    }

    @Override
    public boolean recommendCircle() {
        return recommendCircle;
    }

    @Override
    public String getCircleLogo() {
        return groupLogo;
    }

    @Override
    public String getCircleName() {
        return name;
    }

    @Override
    public String getCircleSign() {
        return IMUtils.getCircleClass(bigClassId);
    }

    @Override
    public String getCircleSize() {
        return size+"";
    }

    @Override
    public String getCircleGrade() {
        return grade+"";
    }

    @Override
    public String getCircleKind() {
        return "群组";
    }

    @Override
    public String getCircleJoinLimit() {
        return "等级要求："+ IMUtils.getLimitGrade(userLevel);
    }

    @Override
    public boolean getJoinState() {
        return joinState;
    }

    @Override
    public int getCircleAuthRule() {
        return authRule;
    }
    @Override
    public boolean isIdentification() {
        return identification==1;
    }

    @Override
    public long getCreateById() {
        return createById;
    }

    @Override
    public void setJoinState(boolean joinState) {
        this.joinState = joinState;
    }

    @Override
    public int getUserLevel() {
        return userLevel;
    }

}
